package cmpe.swe.purcom.dao.extractor;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

import cmpe.swe.purcom.model.Skill;

public class SkillResultSetExtractor implements ResultSetExtractor<Skill> {

	@Override
	public Skill extractData(ResultSet rs) throws SQLException,
			DataAccessException {
		Skill skill = new Skill();
		skill.setId(rs.getLong(1));
		skill.setName(rs.getString(2));
		return skill;
	}

}
